package com.itzhoun.direct;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author 周楠
 * @Date 2022/09/12/上午 5:06
 */
@Component
@RabbitListener(queues = "directQueue")
public class DirectReceiver2 {

    /**
     * 直连交换机轮询获取消息
     * @param messageMap
     */
    @RabbitHandler
    public void receiver2(Map messageMap){
        System.out.println("接受者2 DirectReceiver接收到消息:" + messageMap.toString());
    }


}
